import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsOptional, IsString, MaxLength, MinLength } from 'class-validator';

export class UpdateFavoriteDto {
  @ApiProperty({ description: '收藏夹名称', required: false })
  @IsOptional()
  @IsString()
  @IsNotEmpty()
  @MinLength(1, { message: '收藏夹名称不能为空' })
  @MaxLength(50, { message: '收藏夹名称不能超过50个字符' })
  name?: string;

  @ApiProperty({ description: '收藏夹描述', required: false })
  @IsOptional()
  @IsString()
  @MaxLength(200, { message: '收藏夹描述不能超过200个字符' })
  description?: string;
}